﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ChatGPT.UI;
public class TextHelper
{
    public static string Path = "../../../";
    public static string ReaderText(string file)
    {
        using var reader = new StreamReader($"{Path}/prompt/{file}", Encoding.UTF8);
        return reader.ReadToEnd();
    }
    public static void WriteText(string file, string content)
    {
        using var writer = new StreamWriter($"{Path}/{file}", true, Encoding.UTF8);
        writer.WriteLine("\r\n\r\n\r\n");
        writer.WriteLine(content);
        writer.WriteLine("\r\n\r\n\r\n");
    }
}
